<?php
/**
 * Enter description here ...
 * @author Micou13630
 *
 */
class ComboBoxItem extends TextItem implements IRenderable {
	
	protected $addUnknownValues;
	
	protected $autoFetchData;
	
	protected $completeOnTab;
	protected $defaultToFirstOption;
	protected $defaultValue;
	
	protected $filterWithValue;
	
	protected $pickerIconSrc;
	protected $pickerIconWidth;
	protected $pickerIconHeight;
	protected $showPickerIcon;
	
	protected $showAllOptions;
	protected $showHintInField;
	
	protected $showOptionsFromDataSource;
	
	protected $sortField;
	
	protected $textMatchStyle;
	
	// Function
	protected $getPickListFilterCriteria;
	
	/**
	 * Enter description here ...
	 * @param unknown_type $name
	 */
	public function ComboBoxItem($name) {
		parent::TextItem($name, Constant::EDITOR_TYPE_COMBOBOX);
	}
	
	/**
	 * Permte de définir un filtrage sur PickList
	 * @param unknown_type $expression
	 */
	public function setJSPickListFilterCriteria($expression) {
		$this->getPickListFilterCriteria = new FunctionType(array(), $expression);
	}
	
	/**
	 * Implementation de object
	 * @see IRenderable::object()
	 */
	public function object() {
		return get_class($this);
	}

	/**
	 * Implementation de properties
	 * @see IRenderable::properties()
	 */
	public function properties() {
		return parent::getProp($this);
	}

	/**
	 * Implementation de scLog
	 * @see IRenderable::scLog()
	 */
	public function scLog() {
		ScCollectionLog::getInstance()->addSc(new ScLog($this->object(), get_object_vars($this)));
	}
	
	/**
	 * Implementation de render
	 * @see IScreen::render()
	 */
	public function render() {
		$this->scLog();
		return "{".$this->properties()."}";
	}
}
?>
